{% extends "goalbase.html" %}
{% block content %}
<head>
<script type="text/javascript" src="jquery-1.4.3.js"></script>         
<script type="text/javascript" src="jquery.combobox.js"></script></head>
<td width="89%" rowspan=2> 
<form method='post' action='{{request.path}}'>
 
<fieldset class="module aligned ">
{% for field in goal_form %}
    <div class="form-row">
            <div class="field-box">
                {{ field.errors }}
                {{ field.label_tag }}: {{ field }}
            </div>
    </div>
{% endfor %}
</fieldset>

<fieldset class="module aligned ">
<h2>Plans</h2>
<table>
     <tr>
     {% for field in plan_formset.forms.0 %}
          {% if not field.is_hidden %}
               <th>{{ field.label }}</th>
          {% endif %}
     {% endfor %}
     </tr>
      {% for f in plan_formset.management_form %}
          {{ f }}
     {% endfor %}
     {% for f in plan_formset.forms %}
          <tr>
          {% for field in f %}
               {% if not field.is_hidden %}
                    <td>
                    {{ field.errors }}
                    {{ field }}
                    </td>
               {% else %}
                    <td valign="bottom">{{ field }}</
               {% endif %}
          {% endfor %}
          </tr>
     {% endfor %}
</table>
</fieldset>
   <input title='Submit this form'
      type='submit' name='submit' value='Submit' />
</form>
{% endblock %}
